import { createApp } from 'vue'
import App from './App.vue'
import './style.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import ErrorConfig from './config/ErrorConfig'
import router from './router'
import * as Elicons from "@element-plus/icons-vue";



const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

const app = createApp(App);
app.use(pinia);
app.use(router);
app.use(ElementPlus)
for (const name in Elicons) {
    app.component(name, (Elicons as any)[name]);
}

app.config.errorHandler = ErrorConfig.errorHandler;

app.mount('#app')


